﻿@model IEnumerable<ITProject.WebUI.Models.ProjectAdmin.ProjectAdminProjectTaskViewModel>
@{
    ViewBag.Title = "Zadania w projekcie";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<h2>Panel administracyjny projektu @ViewData["projectName"].ToString()</h2>




<div class="Pmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl,
new ITProject.WebUI.Models.Project.ProjectMenuViewModel { ProjectName = ViewData["ProjectName"].ToString(), Role = ITProject.Domain.UserRole.Supervisor })
</div>



<div class="PAmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectAdminMenu, new List<string> { "Z", ViewData["ProjectName"].ToString() })
@*@Html.ActionLink("Zarządzaj użytkownikami",MVC.ProjectAdmin.ActionNames.ManageTeam, MVC.ProjectAdmin.Name, new { projectName = Model }, null)*@
</div>
<div class="PAplane"> 
<span class="button" id="TSortAsc">Sortowanie A-Z</span>
<span class="button" id="TSortDesc">Sortowanie Z-A</span>
<p class="small">
Wyszukaj: @Html.TextBox("szukaj", null, new { @id = "Tsearch", @class="search"})
</p>
<div class="teamy">    
<table width="100%" class="inbox" id="teams">
<thead>
<tr>
<th class="label" width="20%">Nazwa</th>
<th class="label" width="20%">Status</th>
<th class="label" width="20%">Przypisana do </th>
<th class="label" width="40%">Opcje </th>
</tr>
</thead>
<tbody>

@foreach (var item in Model) {
    <tr>
        <td class="edit">
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td class="edit">
            @Html.DisplayFor(modelItem => item.Status)
        </td>
        <td class="edit">
            @Html.DisplayFor(modelitem=>item.Receiver) 

            
        </td>
        <td class="edit">
            @Html.ActionLink("Edytuj",MVC.ProjectAdmin.ActionNames.EditTask,MVC.ProjectAdmin.Name,new { projectName = ViewData["projectName"].ToString(), TaskId = item.TaskId}, new { @class="button"})
            @Html.ActionLink("Zmień status", MVC.ProjectAdmin.ActionNames.ChangeTaskStatus, MVC.ProjectAdmin.Name, new { projectName = ViewData["projectName"].ToString(), taskId = item.TaskId }, new { @class = "button" })

        </td>
    </tr>
}
</tbody>
</table>
</div>
@Html.ActionLink("Dodaj zadanie", MVC.ProjectAdmin.ActionNames.AddNewTask, MVC.ProjectAdmin.Name, new { projectName = ViewData["ProjectName"].ToString() }, new { @class="button", @title="Dodaj nowy zespół"})


</div>
<div class="clear">
</div>



